package demo3;

/**
 * @Author 12629
 * @Description：
 */
interface IShape {
    //int a = 10;
    void draw();
   /* default public void test() {
        System.out.println("test()");
    }

    public static void test2() {
        System.out.println("static ");
    }*/
}
abstract class A implements IShape {

}


class Rect implements IShape {
    @Override
    public void draw() {
        System.out.println("矩形");
    }
}
class Flower implements IShape {
    @Override
    public void draw() {
        System.out.println("❀");
    }
}

public class TestDemo {
    public static void drawMap(IShape iShape) {
        iShape.draw();
    }
    public static void main(String[] args) {
        //IShape iShape = new IShape();
        IShape iShape1 = new Rect();
        IShape iShape2 = new Flower();
        drawMap(iShape1);
        drawMap(iShape2);
        /*drawMap(new Rect());
        drawMap(new Flower());*/
    }
}
